﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Expenditure.ascx.cs" Inherits="ERP.Modules.Expenditure" %>
<script type="text/javascript">
    var indMoneyExpenditure = function (v) {
        v = (Math.round((v - 0) * 100)) / 100;
        v = (v == Math.floor(v)) ? v + ".00" : ((v * 10 == Math.floor(v * 10)) ? v + "0" : v);
        v = String(v);
        var ps = v.split('.'),
            whole = ps[0],
            sub = ps[1] ? '.' + ps[1] : '.00',
            r = /(\d+)(\d{3})/;
        while (r.test(whole)) {
            whole = whole.replace(r, '$1' + ',' + '$2');
        }
        v = whole;

        return v;
    };
    var NumCheckExpenditure = function () {
        var y = window.App.txtVoucherAmountExpenditure.getValue();
        var k = window.App.txtAmountExpenditure.getValue();
        var z = window.App.txtAmountRemainExpenditure.getValue();
        window.App.txtAmountExpenditure.setValue(FormatNumber(k));
        window.App.txtVoucherAmountExpenditure.setValue(FormatNumber(y));
        window.App.txtAmountRemainExpenditure.setValue(FormatNumber(z));
    };
</script>
<ext:Hidden ID="FormatTypeExpenditure" runat="server" />
<%--------------GridExpenditure-----------------%>
<ext:Panel runat="server" Layout="Fit" Border="False" ID="PanelExpenditure">
    <Content>
        <ext:GridPanel
            ID="grExpenditure"
            runat="server"
            Cls="grid-double"
            EnableColumnMove="true"
            Border="False">
            <Store>
                <ext:Store
                    ID="StoreExpenditure"
                    runat="server"
                    OnReadData="StoreExpenditure_RefreshData"
                    PageSize="20">
                    <Model>
                        <ext:Model runat="server" IDProperty="ID" GroupField="ExpenditureName">
                            <Fields>
                                <ext:ModelField Name="ExpenditureCode" Type="String" />
                                <ext:ModelField Name="ExpenditureDate" Type="Date" />
                                <ext:ModelField Name="IDReceiptReason" Type="Int" />
                                <ext:ModelField Name="PayerRecipientCode" Type="Int" />
                                <ext:ModelField Name="Order_Buy_Id" Type="Int" />
                                <ext:ModelField Name="Order_Id" Type="Int" />
                                <ext:ModelField Name="VoucherFile" Type="String" />
                                <ext:ModelField Name="ReceiptReasonName" Type="String" />
                                <ext:ModelField Name="Customer_Name" Type="String" />
                                <ext:ModelField Name="Customer_Address" Type="String" />
                                <ext:ModelField Name="Order_Buy_Code" Type="String" />
                                <ext:ModelField Name="Order_Code" Type="String" />
                                <ext:ModelField Name="VoucherAmount" Type="Float" />
                                <ext:ModelField Name="AmountPaid" Type="Float" />
                                <ext:ModelField Name="Amount" Type="Float" />
                                <ext:ModelField Name="AmountText" Type="String" />
                                <ext:ModelField Name="Note" Type="String" />
                            </Fields>
                        </ext:Model>
                    </Model>
                </ext:Store>
            </Store>
            <ColumnModel runat="server">
                <Columns>
                    <ext:RowNumbererColumn runat="server" Width="30" Align="Center" />
                    <ext:Column runat="server" Text="Mã phiếu chi" Width="91" DataIndex="ExpenditureCode"></ext:Column>
                    <ext:DateColumn runat="server" Text="Ngày lập" Width="88" DataIndex="ExpenditureDate" Format="dd-MM-yyyy" Align="Center"></ext:DateColumn>
                    <ext:Column runat="server" Text="Phương thức chi" Width="122" DataIndex="ReceiptReasonName"></ext:Column>
                    <ext:Column runat="server" Text="Người nhận tiền" Width="200" DataIndex="Customer_Name"></ext:Column>
                    <ext:Column runat="server" Text="Chứng từ mua" Width="110" DataIndex="Order_Buy_Code">
                        <Renderer Fn="gridNull" />
                    </ext:Column>
                    <ext:Column runat="server" Text="CT đặt(Nếu có)" Width="110" DataIndex="Order_Code" Align="Center">
                        <Renderer Fn="gridNull" />
                    </ext:Column>
                    <ext:Column runat="server" Text="Địa chỉ" Width="159" DataIndex="Customer_Address"></ext:Column>
                    <ext:NumberColumn runat="server" Text="Số tiền theo chứng từ" Width="151" DataIndex="VoucherAmount" Format="0,00" Align="Center"></ext:NumberColumn>
                    <ext:NumberColumn runat="server" Text="Đã thanh toán" Width="150" DataIndex="AmountPaid" Format="0,00" Align="Center"></ext:NumberColumn>
                    <ext:NumberColumn runat="server" Text="Số tiền thanh toán" Width="125" DataIndex="Amount" Format="0,00" Align="Center"></ext:NumberColumn>
                    <ext:Column runat="server" Text="Số tiền bằng chữ" Width="125" DataIndex="AmountText">
                        <Renderer Fn="gridNull" />
                    </ext:Column>
                    <ext:Column runat="server" Text="Ghi chú" DataIndex="Note" Flex="1">
                        <Renderer Fn="gridNull" />
                    </ext:Column>
                </Columns>
            </ColumnModel>
            <Features>
                <ext:Grouping
                    runat="server" 
                    HideGroupedHeader="true"
                    GroupByText="Xem theo phân nhóm"
                    ShowGroupsText="Phân nhóm"
                    GroupHeaderTplString="{name} ({rows.length} danh mục con {[values.rows.length > 1 ? '' : '']})"
                    StartCollapsed="True" />
            </Features>
            <DirectEvents>
                <ItemDblClick OnEvent="ExpenditureDblClick">
                    <ExtraParams>
                        <ext:Parameter Name="ID" Value="record.data.ID" Mode="Raw" />
                    </ExtraParams>
                    <EventMask ShowMask="true" Msg="Đang tải..." />
                </ItemDblClick>
            </DirectEvents>
            <SelectionModel>
                <ext:CheckboxSelectionModel runat="server" Mode="Multi">
                    <Listeners>
                       <SelectionChange Handler="
                            if (selected.length == 0) {
                                #{btnEdit}.disable();
                                #{btnDel}.disable();
                                #{btnExport}.disable();
                            } else {
                                #{btnEdit}.enable();
                                #{btnDel}.enable();
                                #{btnExport}.enable();
                            }" />
                   </Listeners>
                </ext:CheckboxSelectionModel>
            </SelectionModel>
            <View>
                <ext:GridView runat="server" StripeRows="true" />
            </View>
            <DockedItems>
                <ext:Toolbar runat="server" Dock="Top">
                    <Items>
                        <ext:Button ID="btnAddNew" runat="server" Text="Thêm mới" Icon="ApplicationAdd">
                            <DirectEvents>
                                <Click OnEvent="btnAddNew_Click">
                                    <EventMask ShowMask="true" Msg="Đang tải..." />
                                </Click>
                            </DirectEvents>
                        </ext:Button>
                        <ext:ToolbarSeparator />
                        <ext:Button ID="btnEdit" runat="server" Text="Sửa" Icon="ApplicationEdit">
                            <DirectEvents>
                                <Click OnEvent="btnEdit_Click">
                                    <EventMask ShowMask="true" Msg="Đang tải..." />
                                </Click>
                            </DirectEvents>
                        </ext:Button>
                        <ext:ToolbarSeparator />
                        <ext:Button ID="btnDel" runat="server" Text="Xoá" Icon="ApplicationDelete">
                            <DirectEvents>
                                <Click OnEvent="btnDel_Click">
                                    <EventMask ShowMask="true" Msg="Đang tải..." />
                                    <ExtraParams>
                                        <ext:Parameter Name="name" Value="btnDel"></ext:Parameter>
                                    </ExtraParams>
                                    <Confirmation ConfirmRequest="true"
                                        Title="Thông Báo" Message="Bạn có muốn xoá mẫu tin này không ?">
                                    </Confirmation>
                                </Click>
                            </DirectEvents>
                        </ext:Button>
                        <ext:ToolbarSeparator />
                        <ext:Button ID="btnExport" runat="server" Text="Xuất tập tin" Icon="Printer">
                            <Menu>
                                <ext:Menu ID="MenuMain" runat="server">
                                    <Items>
                                        <ext:MenuItem ID="MenuItemExportExcel" runat="server" Text="Excel" Icon="PageExcel">
                                             <DirectEvents>
                                               <Click OnEvent="MenuItemExportExcel_Click" IsUpload="true"></Click>
                                           </DirectEvents>
                                        </ext:MenuItem>
                                    </Items>
                                </ext:Menu>
                            </Menu>
                        </ext:Button>
                        <ext:ToolbarSeparator />
                        <ext:DateField ID="txtDateBeginFillter" EmptyText="Từ ngày" runat="server" MarginSpec="0 8 0 0"/>
                        <ext:DateField ID="txtDateEndFillter" EmptyText="Đến ngày" runat="server" MarginSpec="0 5 0 0"/>
                        <ext:Button ID="btnFillter" runat="server" Text="Lọc" Icon="ApplicationGo" ToolTip="Chọn lọc theo ngày đặt hàng">
                            <DirectEvents>
                                <Click OnEvent="btnFillter_Click">
                                    <EventMask ShowMask="true" Msg="Đang tải..." />
                                </Click>
                            </DirectEvents>
                        </ext:Button>
                    </Items>
                </ext:Toolbar>
                <ext:Toolbar runat="server" Dock="Bottom" AnchorHorizontal="100%">
                    <Items>
                        <ext:TriggerField ID="txtSearch" runat="server" Width="200" EnableKeyEvents="true" MarginSpec="0 8 0 0">
                            <Triggers>
                                <ext:FieldTrigger Icon="Search" />
                            </Triggers>
                            <DirectEvents>
                                <TriggerClick OnEvent="Search_Event"></TriggerClick>
                                 <SpecialKey OnEvent="Search_Event" Before="return e.getKey() == Ext.EventObject.ENTER;">
                                     <EventMask ShowMask="true" Msg="Đang tải..." />
                                </SpecialKey>
                            </DirectEvents>
                        </ext:TriggerField>
                        <ext:PagingToolbar ID="PagingToolbar1" runat="server" StoreID="StoreExpenditure" BeforePageText="Trang" AfterPageText="của {0}" LastText="Cuối" NextText="Kế tiếp" PrevText="Trở lại" FirstText="Đầu" RefreshText="Làm tươi" DisplayInfo="true" DisplayMsg="Trang {0} - {1} của {2}" />
                    </Items>
                </ext:Toolbar>
            </DockedItems>
        </ext:GridPanel>
    </Content>
</ext:Panel>
<ext:Panel runat="server">
    <Content>
        <%-----------WindowsExpenditure-----------------%>
        <ext:Window ID="WindowsExpenditure" runat="server"
            Title="Cập nhật phiếu chi"
            Width="733"
            Height="310"
            Hidden="True"
            Region="Center"
            Modal="true"
            HideMode="Display"
            Border="False"
            Padding="5"
            DefaultButton="btnSavePopUp"
            Resizable="False">
            <Items>
                <ext:Toolbar runat="server">
                    <Items>
                        <ext:Button runat="server" Text="Lưu lại" Icon="Disk" ID="btnSavePopUp">
                            <DirectEvents>
                                <Click OnEvent="btnSavePopUp_Click" Before="return #{FormPanelExpenditure}.isValid();">
                                    <EventMask ShowMask="true" Msg="Đang tải..." />
                                </Click>
                            </DirectEvents>
                        </ext:Button>
                        <ext:ToolbarSeparator />
                        <ext:Button runat="server" Text="Huỷ bỏ" Icon="Decline" ID="btnCancelPopUp">
                            <DirectEvents>
                                <Click OnEvent="btnCancelPopUp_Click">
                                    <EventMask ShowMask="true" Msg="Đang tải..." />
                                </Click>
                            </DirectEvents>
                        </ext:Button>
                        <ext:TextField ID="txtExpenditure_ID" runat="server" FieldLabel="ID" LabelAlign="Right" Hidden="true" />
                        <ext:TextField ID="txtIDCustomer" runat="server" FieldLabel="ID" LabelAlign="Right" Hidden="true" />
                        <ext:TextField ID="txtIDSell" runat="server" FieldLabel="ID" LabelAlign="Right" Hidden="true" />
                    </Items>
                </ext:Toolbar>
                <ext:FormPanel ID="FormPanelExpenditure" runat="server"
                    AutoHeight="true"
                    BodyPadding="10"
                    Frame="true"
                    DefaultAnchor="100%">
                    <Items>
                        <ext:FieldContainer
                            runat="server"
                            Layout="HBoxLayout">
                            <Items>
                                <ext:TextField ID="txtExpenditure_Alias" runat="server" LabelWidth="87" FieldLabel="Mã phiếu chi" Width="200" AllowBlank="False" Margins="0 5 8 0" />
                                <ext:Button runat="server" Text="" Icon="BulletGet" ID="btnReloadCode" ToolTip="Tải lại mã" Margins="0 5 8 0">
                                    <DirectEvents>
                                        <Click OnEvent="btnReloadCode_Click">
                                            <EventMask ShowMask="true" Msg="Đang tải..." />
                                        </Click>
                                    </DirectEvents>
                                </ext:Button>
                                <ext:DateField ID="txtExpenditureDate" runat="server" LabelWidth="50" FieldLabel="Ngày lập" Width="200" AllowBlank="False" Margins="0 5 8 0" />
                                <ext:SelectBox
                                    ID="SelectBoxExpenditureReason"
                                    runat="server"
                                    FieldLabel="Phương thức chi"
                                    DisplayField="ReceiptReasonName"
                                    ValueField="ID"
                                    MarginSpec="0 3 8 0"
                                    AllowBlank="False"
                                    LabelWidth="113"
                                    Width="250"
                                    BlankText="Chọn phương thức chi"
                                    ContextMenuID="slExpenditureReasonContext"
                                    EmptyText="Chọn phương thức chi">
                                    <Store>
                                        <ext:Store ID="StoreExpenditureReason" runat="server" AutoLoad="true" OnReadData="ReloadExpenditureReason">
                                            <Model>
                                                <ext:Model runat="server">
                                                    <Fields>
                                                        <ext:ModelField Name="ReceiptReasonName" />
                                                        <ext:ModelField Name="ID" />
                                                    </Fields>
                                                </ext:Model>
                                            </Model>
                                        </ext:Store>
                                    </Store>
                                    <DirectEvents>
                                        <Select OnEvent="SelectBoxExpenditureReason_Change">
                                            <EventMask ShowMask="true" Msg="Đang tải..."></EventMask>
                                        </Select>
                                    </DirectEvents>
                                </ext:SelectBox>
                            </Items>
                        </ext:FieldContainer>
                        <ext:FieldContainer
                            runat="server"
                            Layout="HBoxLayout">
                            <Items>
                                <ext:TextField ID="txtPayerRecipientCode" ReadOnly="True" runat="server" LabelWidth="87" FieldLabel="Người nhận tiền" Width="410" AllowBlank="False" Margins="0 3 8 0" />
                                <ext:Button runat="server" Text="" Icon="BulletGet" ID="btnGetPayerRecipientCode" ToolTip="Đến danh sách" Margins="3 3 8 0">
                                    <DirectEvents>
                                        <Click OnEvent="btnGetPayerRecipientCode_Click">
                                            <EventMask ShowMask="true" Msg="Đang tải..." />
                                        </Click>
                                    </DirectEvents>
                                </ext:Button>
                                <ext:TextField ID="txtSellCode" ReadOnly="True" runat="server" LabelWidth="112" FieldLabel="Chứng từ mua hàng" Width="225" AllowBlank="True" Margins="0 3 8 0" />
                                <ext:Button runat="server" Text="" Icon="BulletGet" ID="btnGetSellCode" ToolTip="Đến danh sách" Margins="0 5 8 0">
                                    <DirectEvents>
                                        <Click OnEvent="btnGetSellCode_Click">
                                            <EventMask ShowMask="true" Msg="Đang tải..." />
                                        </Click>
                                    </DirectEvents>
                                </ext:Button>
                            </Items>
                        </ext:FieldContainer>
                        <ext:TextField ID="txtAddressCustomer" LabelWidth="86" ReadOnly="True" AnchorHorizontal="100%" runat="server" FieldLabel="Địa chỉ" AllowBlank="False" Margins="0 3 8 0" />
                        <ext:FieldContainer
                            runat="server"
                            Layout="HBoxLayout">
                            <Items>
                                <ext:TextField ID="txtVoucherAmountExpenditure" LabelWidth="86" ReadOnly="True" runat="server" FieldStyle="text-align: right;" FieldLabel="Số tiền theo chứng từ" Width="435" ClientIDMode="Static" AllowBlank="True" Text="0" MaskRe="/[0-9\.]/" Margins="0 5 8 0">
                                    <Listeners>
                                        <Change Fn="NumCheckExpenditure" />
                                    </Listeners>
                                </ext:TextField>
                                <ext:TextField ID="txtAmountExpenditure" runat="server" LabelWidth="108" FieldStyle="text-align: right;" FieldLabel="Số tiền thanh toán" Width="248" AllowBlank="False" ClientIDMode="Static" Text="0" MaskRe="/[0-9\.]/" Margins="5 3 8 0">
                                    <Listeners>
                                        <Change Fn="NumCheckExpenditure" />
                                    </Listeners>
                                </ext:TextField>
                            </Items>
                        </ext:FieldContainer>
                        <ext:TextField ID="txtAmountRemainExpenditure" runat="server" ReadOnly="True" LabelWidth="86" FieldStyle="text-align: right;" FieldLabel="Số tiền còn lại" AnchorHorizontal="100%" AllowBlank="True" ClientIDMode="Static" Text="0" MaskRe="/[0-9\.]/" Margins="5 3 8 0">
                            <Listeners>
                               <Change Fn="NumCheckExpenditure" />
                            </Listeners>
                        </ext:TextField>
                        <ext:TextArea ID="txtExpenditureReason_Note" runat="server" LabelWidth="86" FieldLabel="Ghi chú" AnchorHorizontal="100%" Height="50" Margins="0 3 0 0" />
                    </Items>
                </ext:FormPanel>
            </Items>
        </ext:Window>
        <%-----------WindowsCustomer-----------------%>
        <ext:Window ID="WindowCustomerExpenditure" runat="server"
            Title="Thông tin khách hàng"
            DefaultAnchor="100%"
            Width="829"
            Height="400"
            Hidden="true"
            AutoScroll="false"
            Maximizable="False"
            Minimizable="False"
            AutoDataBind="true"
            Region="Center"
            Resizable="False"
            Modal="true"
            Layout="Fit"
            HideMode="Offsets"
            Constrain="True">
            <Content>
                <ext:GridPanel
                    ID="grCustomerExpenditure"
                    Border="True"
                    runat="server"
                    AutoWidth="true"
                    AutoScroll="true"
                    Cls="gird"
                    EnableColumnMove="true">
                    <Store>
                        <ext:Store
                            ID="StoreCustomerExpenditure"
                            runat="server"
                            OnReadData="StoreCustomerExpenditure_RefreshData"
                            PageSize="14">
                            <Model>
                                <ext:Model runat="server" IDProperty="Customer_ID">
                                    <Fields>
                                        <ext:ModelField Name="Customer_ID" Type="Int" />
                                        <ext:ModelField Name="Customer_Alias" Type="String" />
                                        <ext:ModelField Name="Customer_Name" Type="String" />
                                    </Fields>
                                </ext:Model>
                            </Model>
                        </ext:Store>
                    </Store>
                    <ColumnModel runat="server">
                        <Columns>
                            <ext:RowNumbererColumn runat="server" Width="30" Align="Center" />
                            <ext:Column runat="server" Text="Mã khách hàng" Width="100" DataIndex="Customer_Alias" Align="Left"></ext:Column>
                            <ext:Column runat="server" Text="Tên khách hàng" Width="100" DataIndex="Customer_Name" Align="Left" Flex="1"></ext:Column>
                        </Columns>
                    </ColumnModel>
                    <SelectionModel>
                        <ext:CellSelectionModel runat="server">
                            <DirectEvents>
                                <Select OnEvent="CellExpenditureCustomer_Click">
                                    <EventMask ShowMask="true" Msg="Đang tải..." />
                                </Select>
                            </DirectEvents>
                        </ext:CellSelectionModel>
                    </SelectionModel>
                    <DockedItems>
                        <ext:Toolbar runat="server" Dock="Bottom" AnchorHorizontal="100%">
                            <Items>
                                <ext:PagingToolbar ID="PagingToolbar2" runat="server" StoreID="StoreCustomerExpenditure" BeforePageText="Trang" AfterPageText="của {0}" LastText="Cuối" NextText="Kế tiếp" PrevText="Trở lại" FirstText="Đầu" RefreshText="Làm tươi" DisplayInfo="true" DisplayMsg="Trang {0} - {1} của {2}" />
                            </Items>
                        </ext:Toolbar>
                    </DockedItems>
                </ext:GridPanel>
            </Content>
        </ext:Window>
        <%-----------WindowsOrderBuy-----------------%>
        <ext:Window ID="WindowSellExpenditure" runat="server"
            Title="Thông tin chứng từ"
            DefaultAnchor="100%"
            Width="829"
            Height="400"
            Hidden="true"
            AutoScroll="false"
            Maximizable="False"
            Minimizable="False"
            AutoDataBind="true"
            Region="Center"
            Resizable="False"
            Modal="true"
            Layout="Fit"
            HideMode="Offsets"
            Constrain="True">
            <Content>
                <ext:GridPanel
                    ID="grSellExpenditure"
                    Border="True"
                    runat="server"
                    AutoWidth="true"
                    AutoScroll="true"
                    Cls="gird"
                    EnableColumnMove="true">
                    <Store>
                        <ext:Store
                            ID="StoreSellExpenditure"
                            runat="server"
                            OnReadData="StoreSellExpenditure_RefreshData"
                            PageSize="14">
                            <Model>
                                <ext:Model runat="server" IDProperty="Order_Buy_Id" GroupField="Order_Buy_Code">
                                    <Fields>
                                        <ext:ModelField Name="Order_Buy_Id" Type="Int" />
                                        <ext:ModelField Name="Order_Buy_Code" Type="String" />
                                        <ext:ModelField Name="Order_Code" Type="String" />
                                        <ext:ModelField Name="Order_Buy_DateBegin" Type="Date" />
                                    </Fields>
                                </ext:Model>
                            </Model>
                        </ext:Store>
                    </Store>
                    <ColumnModel runat="server">
                        <Columns>
                            <ext:RowNumbererColumn runat="server" Width="30" Align="Center" />
                            <ext:Column runat="server" Text="Mã phiếu mua hàng" Width="115" DataIndex="Order_Buy_Code"></ext:Column>
                            <ext:Column runat="server" Text="CT đặt hàng" Width="115" DataIndex="Order_Code" Align="Center">
                                <Renderer Fn="gridNull" />
                            </ext:Column>
                            <ext:DateColumn runat="server" Text="Ngày mua hàng" Width="160" DataIndex="Order_Buy_DateBegin" Format="dd-MM-yyyy" Align="Center" Flex="1"></ext:DateColumn>
                        </Columns>
                    </ColumnModel>
                    <Features>
                        <ext:Grouping
                            runat="server" 
                            HideGroupedHeader="true"
                            GroupByText="Xem theo phân nhóm"
                            ShowGroupsText="Phân nhóm"
                            GroupHeaderTplString="{name} ({rows.length} danh mục con {[values.rows.length > 1 ? '' : '']})"
                            StartCollapsed="True" />
                    </Features>
                    <SelectionModel>
                        <ext:CellSelectionModel runat="server">
                            <DirectEvents>
                                <Select OnEvent="CellSellExpenditure_Click">
                                    <EventMask ShowMask="true" Msg="Đang tải..." />
                                </Select>
                            </DirectEvents>
                        </ext:CellSelectionModel>
                    </SelectionModel>
                    <DockedItems>
                        <ext:Toolbar runat="server" Dock="Bottom" AnchorHorizontal="100%">
                            <Items>
                                <ext:PagingToolbar ID="PagingToolbar3" runat="server" StoreID="StoreSellExpenditure" BeforePageText="Trang" AfterPageText="của {0}" LastText="Cuối" NextText="Kế tiếp" PrevText="Trở lại" FirstText="Đầu" RefreshText="Làm tươi" DisplayInfo="true" DisplayMsg="Trang {0} - {1} của {2}" />
                            </Items>
                        </ext:Toolbar>
                    </DockedItems>
                </ext:GridPanel>
            </Content>
        </ext:Window>
        <%--MenuContext--%>
        <ext:Menu runat="server" ID="slExpenditureReasonContext">
            <Items>
                <ext:Button runat="server" Text="Tải lại" Icon="DatabaseRefresh" Flat="True">
                    <Listeners>
                        <Click Handler="#{SelectBoxExpenditureReason}.clearValue(); #{StoreExpenditureReason}.reload(); #{slExpenditureReasonContext}.hide();"></Click>
                    </Listeners>
                </ext:Button>
            </Items>
        </ext:Menu>
        <%--End--%>
    </Content>
</ext:Panel>